{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>编辑房车信息</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/caravan"><i class="fa fa-dashboard"></i> 房车信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 编辑房车信息</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          请准确编辑房车信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <!-- 选项卡start -->
      <div class="bs-example">
        <!-- 选项卡标题start -->
        <ul class="nav nav-tabs" style="margin-bottom:15px;">
          <li class="active">
            <a href="#one" data-toggle="tab">基本信息</a>
          </li>
        </ul>
        <!-- 选项卡标题end -->
        <!-- 选项卡内容start -->
        <div id="myTabContent" class="tab-content">
          <!-- 选项卡内容1start -->
          <div id="one" class="tab-pane fade active in">
            <form class="form-horizontal" role="form" action="/caravan/{$id}" method="post">
              <input type="hidden" id='method' name="_method" value="PUT">
              <!-- 基本信息start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading ">
                    <h3 class="panel-title">
                      基本信息
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">房车编号</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="number" id="firstname" value="{$list.number}" readonly 
                            placeholder="请正确填写车系编号">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">房车名称</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="name" id="firstname" value="{$list.name}" readonly
                            placeholder="请填写车系名称">
                      </div>
                    </div>
                    
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-3">车辆品牌</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_brands_id" disabled>
                      {volist name='brand' id='vo'}
                      {if $list.car_brands_id==$vo.id}
                        <option value={$vo.id} selected='true'>{$vo.name}</option>
                      {else} 
                        <option value={$vo.id} >{$vo.name}</option>
                      {/if}
                      {/volist}
                      </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">车型</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_cates_id" disabled>
                       {foreach $carcates as $k => $type}
                       {if $list.car_cates_id==$k}
                       <option value={$k} selected='true'>{$type}</option>
                       {else}
                       <option value={$k} >{$type}</option>
                       {/if}
                       {/foreach}
                      </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">排挡</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="speed" disabled>
                       <option selected='true' value="1">自动挡</option>
                       <option value="2">手动挡</option>
                      </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">房车服务机构</label>
                      <div class="col-sm-9">
                      <select name='services' id="bs3Select" class="selectpicker show-tick form-control"  data-live-search="true" disabled>  
                      {volist name='camps' id='vo' }
                          <option value={$vo.id}  >{$vo.name}</option>
                      {/volist}
                      </select>
                      </div>
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">泊位编号</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="park_num" id="firstname" value="{$list.park_num}" readonly
                            placeholder="请填写车系名称">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">注册日期</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="registration" id="firstname" value="{$list.registration}" readonly
                            placeholder="例，2014-10-12">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">车主姓名</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="size" id="firstname" value="{$list.size}" readonly
                            placeholder="例，2014-10-12">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">车牌号</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="" id="firstname" value="{$list.size}" readonly
                            placeholder="例，2014-10-12">
                      </div>
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">国别</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_countries_id" disabled>
                       {foreach $country as $k => $type}
                       {if $list.car_countries_id==$k}
                       <option value={$k} selected='true'>{$type}</option>
                       {else}
                       <option value={$k} >{$type}</option>
                       {/if}
                       {/foreach}
                      </select>
                      </div>
                    </div>

                    <div class="form-group ">
                      <label class="control-label col-sm-3">准驾类型</label>
                        <div class="col-sm-9">
                          <select class="form-control" name="car_countries_id">
                           {foreach $drive_type as $k => $v}
                           {if $list.driver_type==$k}
                           <option value={$k} selected='true'>{$v}</option>
                           {else}
                           <option value={$k} >{$v}</option>
                           {/if}
                           {/foreach}
                          </select>
                        </div>
                    </div>



                  </div>
                </div>
              </div>
              <!-- 基本信息end -->
              <!-- 车内配套设施start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      车内配套设施
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">长*宽*高(mm)</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="size" id="firstname" value="{$list.size}" readonly
                            placeholder="例，5999*2420*3034">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">单人床数量(张)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="single_bed_num" id="firstname" value="{$list.single_bed_num}" readonly
                            placeholder="8"></input>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">双人床数量(张)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="double_bed_num" id="firstname" value="{$list.double_bed_num}" readonly
                            placeholder="8"></input>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">可住几人</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control"  name="people_num" id="firstname" value="{$list.people_num}" readonly
                            placeholder="请直接填写阿拉伯数字"></input>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">沙发乘坐人数</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control"  name="sofe_num" id="firstname" value="{$list.sofe_num}" readonly
                            placeholder="请直接填写阿拉伯数字"></input>
                      </div>
                    </div>
                    

                    {foreach $ziduans as $key=>$value}
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">{$key|lang}</label>
                      {foreach $value as $k=>$v}
                      <label class="radio-inline">
                      {if $list->getData($key)==$k}
                      <input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio" disabled>{$v|lang}
                      {else}
                      <input id="{$key.$k}" disabled name="{$key}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                     </div>
                  {/foreach}

                  </div>
                </div>
              </div>
              <!-- 车内配套设施end -->
              <!-- 图片start -->
              <div class="col-lg-10 col-lg-offset-1">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      封面图片
                    </h3>
                  </div>
                  <div class="panel-body">
                    <img src="{$list.caravancover[0]}">
                  </div>
                </div>
              </div>
              <div class="col-lg-10 col-lg-offset-1">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      内容图片
                    </h3>
                  </div>
                  <div class="panel-body">
                    {foreach $list.piccaravan as $key=>$value}
                        <img src="{$list.piccaravan[$key]}" style="width:40%; padding-bottom:10px;">
                    {/foreach}
                  </div>
                </div>
              </div>
              <div class="col-lg-6 col-lg-offset-6">
                <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
              </div>
              <!-- 图片end -->
            </form>
          </div>
          <!-- 选项卡内容1end -->
        </div>
        <!-- 选项卡内容end -->
      </div>
      <!-- 选项卡end -->
    </div>

  </div><!-- /#page-wrapper -->

